package com.abao.mapper;

import com.abao.entity.MarketWdOrderSupply;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface MarketWdOrderSupplyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @Delete({
        "delete from market_wd_order_supply",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @Insert({
        "insert into market_wd_order_supply (id, order_id, ",
        "supply_uid, status, ",
        "create_time)",
        "values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, ",
        "#{supplyUid,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, ",
        "#{createTime,jdbcType=INTEGER})"
    })
    int insert(MarketWdOrderSupply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @InsertProvider(type=MarketWdOrderSupplySqlProvider.class, method="insertSelective")
    int insertSelective(MarketWdOrderSupply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "id, order_id, supply_uid, status, create_time",
        "from market_wd_order_supply",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER),
        @Result(column="supply_uid", property="supplyUid", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER)
    })
    MarketWdOrderSupply selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MarketWdOrderSupplySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MarketWdOrderSupply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table market_wd_order_supply
     *
     * @mbg.generated
     */
    @Update({
        "update market_wd_order_supply",
        "set order_id = #{orderId,jdbcType=INTEGER},",
          "supply_uid = #{supplyUid,jdbcType=INTEGER},",
          "status = #{status,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(MarketWdOrderSupply record);
}